import { createApp } from 'vue'
import { createPinia } from 'pinia'

//导入pinia数据持久化管理包
import  piniaPluginPersistedstate from 'pinia-plugin-persistedstate'
import App from './App.vue'
import router from './router'

//导入图片懒加载插件
import { lazyimg } from './directives/index.js'

//导入注册全局组件的插件
import { usecomponent } from './components/index.js'
//引入初始样式文件
import './styles/common.scss'

//测试接口函数
// import {getdoods} from '@/apis/textapi'
// getdoods().then(res =>{
//         console.log(res);
        
// },err =>{
//     console.log(err);
    
// })
const pinia = createPinia()
pinia.use(piniaPluginPersistedstate)
const app = createApp(App)
app.use(pinia)
//注册图片懒加载插件
app.use(router)
//注册 注册全局组件的插件
app.use(lazyimg)
app.use(usecomponent)

app.mount('#app')

